export keda_version=$(
  curl -sL \
    https://api.github.com/repos/kedacore/keda/releases/latest |
    jq -r '.tag_name | ltrimstr("v")'
)
echo "keda: ${keda_version}"
kubectl apply --server-side  -f https://github.com/kedacore/keda/releases/download/v${keda_version}/keda-${keda_version}.yaml
kubectl apply --server-side  -f https://github.com/kedacore/keda/releases/download/v${keda_version}/keda-${keda_version}-core.yaml

export http_add_on_version=$(
  curl -sL \
    https://api.github.com/repos/kedacore/http-add-on/releases/latest |
    jq -r '.tag_name | ltrimstr("v")'
)
echo "keda_http_add_on_version: ${http_add_on_version}"
kubectl apply --server-side -f https://github.com/kedacore/http-add-on/releases/download/v${http_add_on_version}/keda-http-add-on-${http_add_on_version}.yaml